<template>
  <div class="moment">
    <h3>{{ time }}</h3>
    <div ref="box">时刻</div>
    <button @click="click">res</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      time: "12:05",
    };
  },
  methods: {
    click() {
      this.$nextTick(() => {
        this.$refs.box.innerHTML = "512";
        console.log(this.$refs.box.innerHTML);
      });
    },
  },
  created() {
    const res = JSON.parse(JSON.stringify(this.time));
    console.log(res,'res');
  },
};
</script>

<style>
</style>